home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 April: Mac OS SDK / Dev.CD Apr 00 SDK1.toast / Development Kits / Hardware / PowerManager DDK 1.0f1 / Interfaces&Libraries / Interfaces / Patches.h < prev    next >
Encoding:
C/C++ Source or Header  |  1999-10-08  |  4.6 KB  |  169 lines  |  [TEXT/MPS ]

  1. /*
  2.      File:        Patches.h
  3.  
  4.      Contains:    Patch Manager Interfaces.
  5.  
  6.      Version:    System 8
  7.  
  8.      DRI:        Jeff Cobb
  9.  
  10.      Copyright:    © 1994-1999 by Apple Computer, Inc., all rights reserved
  11.  
  12.      Warning:    *** APPLE INTERNAL USE ONLY ***
  13.                  This file may contain unreleased API's
  14.  
  15.      BuildInfo:    Built by:            Scott Johnson
  16.                  On:                    10/8/99 11:26 AM
  17.                  With Interfacer:    3.0d13   (MPW PowerPC)
  18.                  From:                Patches.i
  19.                      Revision:        28
  20.                      Dated:            1/25/99
  21.                      Last change by:    ngk
  22.                      Last comment:    Add exportset attributes to functions. Change pragma output to
  23.  
  24.      Bugs:        Report bugs to Radar component "System Interfaces", "Latest"
  25.                  List the version information (from above) in the Problem Description.
  26.  
  27. */
  28.  
  29. #ifndef __PATCHES__
  30. #define __PATCHES__
  31.  
  32. #ifndef __MACTYPES__
  33. #include <MacTypes.h>
  34. #endif
  35.  
  36.  
  37.  
  38.  
  39. #if PRAGMA_ONCE
  40. #pragma once
  41. #endif
  42.  
  43. #ifdef __cplusplus
  44. extern "C" {
  45. #endif
  46.  
  47. #if PRAGMA_IMPORT
  48. #pragma import on
  49. #endif
  50.  
  51. #if PRAGMA_STRUCT_ALIGN
  52.     #pragma options align=mac68k
  53. #elif PRAGMA_STRUCT_PACKPUSH
  54.     #pragma pack(push, 2)
  55. #elif PRAGMA_STRUCT_PACK
  56.     #pragma pack(2)
  57. #endif
  58.  
  59. #if TARGET_OS_MAC && CALL_NOT_IN_CARBON
  60. enum {
  61.     kOSTrapType                    = 0,
  62.     kToolboxTrapType            = 1
  63. };
  64.  
  65. typedef SignedByte                         TrapType;
  66. enum {
  67.     OSTrap                        = kOSTrapType,                    /* old name */
  68.     ToolTrap                    = kToolboxTrapType                /* old name */
  69. };
  70.  
  71. /*
  72.     GetTrapAddress and SetTrapAddress are obsolete and should not
  73.     be used. Always use NGetTrapAddress and NSetTrapAddress instead.
  74.     The old routines will not be supported for PowerPC apps.
  75. */
  76. #if TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  77.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  78.                                                                                             #pragma parameter __A0 GetTrapAddress(__D0)
  79.                                                                                             #endif
  80. EXTERN_API( UniversalProcPtr )
  81. GetTrapAddress                    (UInt16                 trapNum)                            ONEWORDINLINE(0xA146);
  82.  
  83.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  84.                                                                                             #pragma parameter SetTrapAddress(__A0, __D0)
  85.                                                                                             #endif
  86. EXTERN_API( void )
  87. SetTrapAddress                    (UniversalProcPtr         trapAddr,
  88.                                  UInt16                 trapNum)                            ONEWORDINLINE(0xA047);
  89.  
  90. #endif  /* TARGET_CPU_68K && !TARGET_RT_MAC_CFM */
  91.  
  92. EXTERN_API( UniversalProcPtr )
  93. NGetTrapAddress                    (UInt16                 trapNum,
  94.                                  TrapType                 tTyp);
  95.  
  96. EXTERN_API( void )
  97. NSetTrapAddress                    (UniversalProcPtr         trapAddr,
  98.                                  UInt16                 trapNum,
  99.                                  TrapType                 tTyp);
  100.  
  101.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  102.                                                                                             #pragma parameter __A0 GetOSTrapAddress(__D0)
  103.                                                                                             #endif
  104. EXTERN_API( UniversalProcPtr )
  105. GetOSTrapAddress                (UInt16                 trapNum)                            ONEWORDINLINE(0xA346);
  106.  
  107.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  108.                                                                                             #pragma parameter SetOSTrapAddress(__A0, __D0)
  109.                                                                                             #endif
  110. EXTERN_API( void )
  111. SetOSTrapAddress                (UniversalProcPtr         trapAddr,
  112.                                  UInt16                 trapNum)                            ONEWORDINLINE(0xA247);
  113.  
  114.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  115.                                                                                             #pragma parameter __A0 GetToolTrapAddress(__D0)
  116.                                                                                             #endif
  117. EXTERN_API( UniversalProcPtr )
  118. GetToolTrapAddress                (UInt16                 trapNum)                            ONEWORDINLINE(0xA746);
  119.  
  120.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  121.                                                                                             #pragma parameter SetToolTrapAddress(__A0, __D0)
  122.                                                                                             #endif
  123. EXTERN_API( void )
  124. SetToolTrapAddress                (UniversalProcPtr         trapAddr,
  125.                                  UInt16                 trapNum)                            ONEWORDINLINE(0xA647);
  126.  
  127.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  128.                                                                                             #pragma parameter __A0 GetToolboxTrapAddress(__D0)
  129.                                                                                             #endif
  130. EXTERN_API( UniversalProcPtr )
  131. GetToolboxTrapAddress            (UInt16                 trapNum)                            ONEWORDINLINE(0xA746);
  132.  
  133.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  134.                                                                                             #pragma parameter SetToolboxTrapAddress(__A0, __D0)
  135.                                                                                             #endif
  136. EXTERN_API( void )
  137. SetToolboxTrapAddress            (UniversalProcPtr         trapAddr,
  138.                                  UInt16                 trapNum)                            ONEWORDINLINE(0xA647);
  139.  
  140. #if TARGET_CPU_PPC
  141. EXTERN_API( UniversalProcHandle )
  142. GetTrapVector                    (UInt16                 trapNumber);
  143.  
  144. #endif  /* TARGET_CPU_PPC */
  145.  
  146. #endif  /* TARGET_OS_MAC && CALL_NOT_IN_CARBON */
  147.  
  148.  
  149. #if PRAGMA_STRUCT_ALIGN
  150.     #pragma options align=reset
  151. #elif PRAGMA_STRUCT_PACKPUSH
  152.     #pragma pack(pop)
  153. #elif PRAGMA_STRUCT_PACK
  154.     #pragma pack()
  155. #endif
  156.  
  157. #ifdef PRAGMA_IMPORT_OFF
  158. #pragma import off
  159. #elif PRAGMA_IMPORT
  160. #pragma import reset
  161. #endif
  162.  
  163. #ifdef __cplusplus
  164. }
  165. #endif
  166.  
  167. #endif /* __PATCHES__ */
  168.  
  169.